<?= isset($header) ? $header : '' ?>
<div id="content">
    <div class="form_style">
        <div class="title">
            <h5>編輯權限</h5>
        </div>
        <form method="post" action="<?= site_url('/role/edit_submit') ?>" id="userinfo">
            <table border="1">
                <tbody><tr>
                        <th width="80">權限名稱：</th>
                        <td>
                            <input type="text" id="role_name" name="role_name" value="<?= $role->role_name ?>">
                        </td>
                    </tr>
                    <tr>
                        <th>說明：</th>
                        <td><input type="text" id="description" name="description" value="<?= $role->description ?>"></td>
                    </tr>
                    <tr>
                        <th>所屬部門：</th>
                        <td>
                            <select name="department_id" id="department_id">
                                <? foreach($department as $key=>$val){?>
                                <option value="<?= $val->department_id ?>" <? if($role->department_id==$val->department_id) echo "selected";?>><?= $val->department_name ?></option>
                                <?
                                }
                                ?>
                            </select>
                        </td>
                    </tr>

                    <tr>
                        <td></td>
                        <td class="last_save">
                            <input type="hidden" id="role_id" name="role_id" value="<?= $role->role_id ?>">
                            <input type="submit" onclick="return checkadduser();" value="確定" class="input_background">
                            <input type="reset" value="重置" class="input_background"></td>
                    </tr>
                </tbody></table>
        </form>
    </div>
</div>
<?=
isset($footer) ? $footer : ''?>